Arexx (3/45)

From:Bernd Gollesch
Date:11 Aug 2001 at 12:11:15
Subject:Re: Back to my "ITERATE" problem

> I have now got back into the swing of things and am playing with this
> "terminate the loop" thing.

If you want to "terminate the loop" if the name is found you have to
use the "LEAVE" command. ITERATE just will continue with the loop at
the start.

> DO i = 1 to 6
> IF name = test.i THEN
> DO
> ECHO 'Found'
LEAVE i
> END
> ECHO i
> END

You will get:

> 1
> 2
> 3
> 4
> Found
> Exiting program



CU, Bernd Gollesch /'''\ Europa, Austria, Styria
A 1200 - 060/50MHz ( o o ) Writer for:
2MB Chip 32MB Fast ---oOOO---(_)---OOOo--- http://www.amigascene.com/

ARexx mailing list - No flames, no overquoting, no crossposting.
Unsub: Blank mail to mailto:arexx-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/